import request from '@/utils/request';

const PRE_URL = '/forecast/gmv';

/**
 * 根据Id获取
 * @param {*} params
 */
export async function getById(gmvId) {
  return request(`${PRE_URL}/getById`, {
    method: 'POST',
    data: {
      id: gmvId,
    },
  });
}

/**
 * 修改GMV信息
 * @param {*} params
 */
export async function editGmv(params) {
  return request(`${PRE_URL}/update`, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

/**
 * 查询
 * @param {*} params
 */
export async function queryGmv(params) {
  return request(`${PRE_URL}/getByPage`, {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

/**
 * 查询指定GMV的操作日志
 * @param {*} gmvId
 */
export async function queryOptLog(gmvId) {
  return request(`${PRE_URL}/listLog`, {
    method: 'POST',
    data: {
      id: gmvId,
    },
  });
}
